package com.cqut.service;

import java.util.List;
import java.util.Map;

import com.cqut.dto.CodeManagerDTO;
import com.cqut.dto.LimitShowDTO;
import com.cqut.model.CodeManager;

public interface ICodeManagerService {
    boolean save(CodeManager codeManager);

    boolean update(CodeManager codeManager);

    boolean delete(String codeId);

    boolean batchDelete(String[] codeId);

    CodeManager findModel(String codeId);

    CodeManager findModel(String codeId, String[] parameters);

    Map<String, Object> findMap(String codeId);

    Map<String, Object> findMap(String codeId, String[][] parameters);

    List<CodeManager> loadModels();

    List<CodeManager> loadModels(String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<CodeManager> loadModels(String[] parameters, String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<Map<String, Object>> loadMaps();

    List<Map<String, Object>> loadMaps(String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<Map<String, Object>> loadMaps(String[][] parameters, String condition, Object[] values, String order, String sort, int curPage, int limit);

    long count();

    long count(String condition, Object[] values);

    long count(String[] parameters, boolean isDistinct);

    long count(String[] parameters, String condition, Object[] values, boolean isDistinct);

	boolean duplicateCheckingCodeName(String validationDate);

	List<Map<String, Object>> findChildrenByCodeType(String codeType);

	boolean addTableCode(CodeManagerDTO codeManagerDTO);

	boolean deleteTableCodesByParamCodes(String[] codeNoArray);
	
	Map<String, Object> getDetailById(String codeId);

	List<Map<String, Object>> getCodeList(String codeName, String parentId, LimitShowDTO limitShowDTO);

	long getCodeListCount(String parentId, String codeName);

	boolean CheckingCodeType(String validationDate);

}
